<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>title</title>
      <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
      <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
      <style>
      header {
          width: 100%;
        box-sizing: border-box;
      }
      </style>
  </head>
  <body>
    <header id="header">
    </header>
  <footer class="aui-bar aui-bar-tab" id="footer">
  </footer>
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript">
  apiready = function(){
      api.parseTapmode();
       header = $api.byId('header');
      $api.fixStatusBar(header);
      headerPos = $api.offset(header);
               footerH = $api.offset($api.byId('footer')).h;


      login_frm();



//       api.actionSheet({
//
//           cancelTitle: '取消 ',
//           buttons: ['切换账号登录','注册账号']
//       }, function(ret, err){
//       if(ret.buttonIndex==1){
//     login_frm();
//       }else if(ret.buttonIndex==2){
// fnregister();
//       }
//       });
  };
var headerPos,header,footerH


  function login_frm(){ api.openFrame({
        name: 'login_frm',
        url: 'login_frm.html',
        bounces: true,

        rect: {
            x: 0,
            y: headerPos.h,
            w: 'auto',
            h: api.winHeight-headerPos.h-footerH
        }
    })}





    function fnregister() {
      api.openWin({
          name: 'register_win',
            slidBackEnabled:true,
          url: 'register_win.html',
          pageParam: {
              name: 'text'
          }
      });
      api.showProgress({
          style: 'default',
          animationType: 'fade',
          title: '努力加载中...',
          text: '先喝杯茶...',
          modal: false
      });
      api.hideProgress();

    }
  </script>
  </html>
